//
//  HKProfileListCellModel.m
//  HKTimeKitApp
//
//  Created by huzhaoke1 on 2023/5/11.
//

#import "HKProfileListCellModel.h"
#import "HKProfileViewController.h"
#import "HKProfileCell.h"
#import "HKUserInfoViewController.h"

@implementation HKProfileListCellModel

- (instancetype)init {
    if (self = [super init]) {
        self.cellClass = HKProfileCell.class;
        HKProfileCellViewModel *cellViewModel = [HKProfileCellViewModel new];
        cellViewModel.title = @"用户信息";
        cellViewModel.imageName = @"UserCircle";
        cellViewModel.arrowImageName = @"CaretRight";
        self.content = cellViewModel;
        self.cellHeight = [HKProfileCell cellHeightWithContent:cellViewModel];
        [self setRender:^(__kindof HKListCellModel * _Nonnull cellModel, id  _Nonnull cell) {
            HKBaseTableViewCell *tbCell = KSSAFE_CAST(cell, HKBaseTableViewCell);
            [tbCell updateContent:cellModel.content];
        }];
        WS
        [self setCellDidSelectBlock:^(HKListCellModel * _Nonnull cellModel, NSIndexPath * _Nonnull indexPath, id  _Nonnull cell) {
           SS
            [self.context.fromViewController.navigationController pushViewController:[HKUserInfoViewController new] animated:YES];
        }];
    }
    return self;
}


@end
